﻿@model NC.Infrastructure.Domain.Identity.Person

@{
    ViewBag.Title = "Create";
}


<section class="content-header">
    <h1>
        添加用户信息
    </h1>
    <ol class="breadcrumb">
        <li><a href="@Url.Action("Index")"><i class="fa fa-dashboard"></i>首页</a></li>
    </ol>
</section>

<section class="content">
    <div class="box box-solid ">
        <div class="box-body">
            <div class="row">
                <div class="col-md-8 col-md-offset-2">
                    @using (Html.BeginForm())
                    {
                    @Html.AntiForgeryToken()
                    <div class="form-horizontal">
                        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
                        @Html.Partial("Form")
                        <div class="form-group">
                            <div class="col-md-offset-2 col-md-10">
                                <input type="submit" value="创建" class="btn btn-primary" />
                            </div>
                        </div>
                    </div>
                    }
                </div>
            </div>
        </div>
    </div>
</section>

<script type="text/javascript">
    
    //重新实例化一个编辑器，防止在上面的editor编辑器中显示上传的图片或者文件
    var _HeadImageEditor = UE.getEditor('HeadImage');
    _HeadImageEditor.ready(function () {
        //设置编辑器不可用
        //_HeadImageEditor.setDisabled();
        //隐藏编辑器，因为不会用到这个编辑器实例，所以要隐藏
        _HeadImageEditor.hide();

        //侦听文件上传
        _HeadImageEditor.addListener('afterUpfile', function (t, arg) {
            console.log(arg[0].url);
            $("#"+window.uploadFileNameOOXX).val(arg[0].url);
        })
    });
    //弹出文件上传的对话框
    function upFiles(obj) {
        var myFiles = _HeadImageEditor.getDialog("attachment");
        myFiles.open();
        window.uploadFileNameOOXX=obj;
    }

    !function () {
        laydate.skin('molv');//切换皮肤，请查看skins下面皮肤库
        laydate({ elem: '#birthday' });//绑定元素
    }();

</script>
